import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import HelloWorld from '@/components/HelloWorld'
import Analyse from '@/views/Analyse'
import User from '@/views/User'
import KPI from '@/views/KPI'
import Tag from '@/views/Tag'
import TagDetails from '@/views/TagDetails'
import Funnel from '@/views/Funnel'
import TagEdit from '@/views/TagEdit'
import GroupList from '@/views/GroupList'
import GroupAnalysis from '@/views/GroupAnalysis'
import DistributionAnalysis from '@/views/DistributionAnalysis'
import Email from '@/views/Email'
import Message from '@/views/Message'
import Notice from '@/views/Notice'
//渠道分析路由
import Channel from '@/views/Channel'
//人群分析
import Crowd from '@/views/Crowd'
//留存分析
import Keep from '@/views/Keep'
//用户登陆
import Login from '@/views/Login'
//用户管理
import UserSystem from '@/views/UserSystem'
//角色管理
import RolesSystem from '@/views/RolesSystem'
//事件分析
import Event from '@/views/EventAnalyse'
//漏斗分析
import FunnelAnalysis from '@/views/FunnelAnalysis'
//留存分析
import Preserve from '@/views/Preserve'
//定时触发
import ScheduledTask from '@/views/ScheduledTask'
//行为触发
import Behavior from '@/views/Behavior'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/',
      redirect: '/login'
    }
    , {
      path: '/',
      name: 'Analyse',
      component: Analyse,
      children: [{
        path: '/user',
        name: 'User',
        component: User,
      },
      {
        path: '/kpi',
        name: 'KPI',
        component: KPI,
      },
      {
        path: '/channel',
        name: 'Channel',
        component: Channel
      },
      {
        path: '/tag',
        name: 'Tag',
        component: Tag,
      },
      {
        path: '/details',
        name: 'TagDetails',
        component: TagDetails,
      },
      {
        path: '/tagedit',
        name: 'TagEdit',
        component: TagEdit,
      },
      {
        path: '/event',
        name: 'Event',
        component: Event,
      },
      {
        path: '/keep',
        name: 'keep',
        component: Preserve
      },
      {
        path: '/funnel',
        name: 'Funnel',
        component: FunnelAnalysis,
      },
      {
        path: '/group',
        name: 'GroupList',
        component: GroupList,
      },
      {
        path: '/Crowd',
        name: 'Crowd',
        component: Crowd
      },
      {
        path: '/groupanalysis',
        name: 'GroupAnalysis',
        component: GroupAnalysis,
      },
      {
        path: '/DistributeAnalysis',
        name: 'DistributeAnalysis',
        component: DistributionAnalysis,
      },
      {
        path: '/Email',
        name: 'Email',
        component: Email,
      },
      {
        path: '/Message',
        name: 'Message',
        component: Message,
      },
      {
        path: '/Notice',
        name: 'Notice',
        component: Notice,
      },
      {
        path: '/SystemUse',
        name: 'systemuse',
        component: UserSystem
      },
      {
        path: '/RolesSystem',
        name: 'rolessystem',
        component: RolesSystem
      },{
        path: '/ScheduledTask',
        name: 'scheduledTask',
        component: ScheduledTask
      },{
        path: '/behavior',
        name: 'behavior',
        component: Behavior
      }
      ]
    }

  ]
})
